<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .container {
            margin: 200px;
            border: 1px solid #ddd;
            text-align: center;
            padding: 90px 0;
        }
        a,.img,.mask,.border{
            width: 300px;
            height: 300px;
            border-radius: 50%;
            box-sizing: border-box;
        }
        a{
            display: block;
            position: relative;
            margin: auto;
            /* 设置动画过渡 */
            transition: all .5s ease-in-out;
        }
        /* 利用position absolute 重叠图像 */
        .img,.mask,.border{
            position: absolute;
        }
        /* 设置border容器的 border color 并设置动画过渡 */
        .border{
            border: 10px solid #c20018;
            border-top-color:#85b73e;
            border-right-color: #85b73e; 
            transition: all .5s linear ;
        }
        .img{
            background:url('./../images/mobile1.jpg') center;
            background-size: cover;
        }
        /* 设置蒙层的初始状态 为透明 并设置动画过渡 */
        .mask{
            background-color: rgba(0, 0, 0, 0);
            color: rgba(0, 0, 0, 0);
            transition: all .5s linear;
        }
        .mask p:first-child{
            margin-top:120px;
        }
        /* border容器旋转180度 */
        a:hover .border{
            transform: rotate(180deg);
        }
        /* 改变蒙层的背景颜色和字体颜色的透明度*/
        a:hover .mask{
            background-color: rgba(0, 0, 0, 0.4);
            color: rgba(255, 255, 255, 1);
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- 分别存放三个不同的div容器 -->
        <a href="#">
            <!-- 放置图片 -->
            <div class="img"></div>
            <!-- 设置蒙层 内容 hover才出现 -->
            <div class="mask">
                <p>Beautiful Animation</p>
                <p>上传图片</p>
            </div>
            <!-- 设置旋转的border 框 -->
            <div class="border"></div>
        </a>
    </div>
</body>

</html>